import { request } from './request';
const preUrl = '/certificate';

export function findPageFinishApi(query: any) {
  return request({
    // url: preUrl + `/finish/findPage`, //测试已完结
    url: preUrl + `/assessSeal/findPage`,
    method: 'post',
    data: query
  })
}

export function loadDetailAssessApi(query: any) {
  return request({
    url: preUrl + `/finish/${query.matterId}`,
  })
}

//申请表pdf
export function getApplyTablePdf(query:any) {
  return request({
    url: preUrl + `/table/applyTable/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}

//获取电子签章
export function getESignature(query:any) {
  return request({
    url: preUrl + `/assessSeal/eSignature`,
    method: 'get',
  })
}


//盖章审核
export function auditApi (query:any) {
  const params = new URLSearchParams();
  params.append('matterId', query.matterId);
  params.append('deformityType', query.deformityType);
  params.append('auditStatus', query.auditStatus);
  params.append('auditOpinion', query.auditOpinion);
  return request({
      url: preUrl+`/assessSeal/appCoverSeal`,
      method: 'post',
      params
  })
}


//一键审核
export function batchCoverSealApi () {
  return request({
      url: preUrl+`/assessSeal/batchCoverSeal`,
      method: 'post',
  })
}

//登陆
export function loginApi(query:any) {
  return request({
    url: preUrl + `/sso/loginApp`,
    method: 'get',
    params: query,
  })
}

//获取待审核数量 userAreaCode
export function loadAssessSealCountApi(query:any) {
  return request({
    url: preUrl + `/assessSeal/assessSealCount`,
    method: 'get',
    params: query,
  })
}


//
export function getAssessTableFncApi(query:any){
  return request({
    url: preUrl + `/assessSeal/assessSealCount`,
    method: 'get',
    params: query,
  })
}

//评定表pdf
export function getAssessTablePdf(query:any) {
  return request({
    url: preUrl + `/table/assessTabl/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//听力表pdf
export function getHearingTablePdf(query:any) {
  return request({
    url: preUrl + `/table/hearingTable/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//智力表pdf
export function getIntelligencePdf(query:any) {
  return request({
    url: preUrl + `/table/intelligence/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//肢体表pdf
export function getLimbPdf(query:any) {
  return request({
    url: preUrl + `/table/limb/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//言语表pdf
export function getSpeechTablePdf(query:any) {
  return request({
    url: preUrl + `/table/speechTable/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//精神表pdf
export function getSpiritTablePdf(query:any) {
  return request({
    url: preUrl + `/table/spiritTable/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}
//视力表pdf
export function getVisionTablePdf(query:any) {
  return request({
    url: preUrl + `/table/visionTable/export/${query}`,
    method: 'get',
    responseType: 'blob',
  })
}


//衢州 获取权限
export function ssoGetPermissionApi(query) {
  return request({
    url: preUrl + `/sso/getPermission`,
    method: 'get',
    params: query,
  })
}


